$(function(){
            $('.recharge_money ul li').on('touchstart',function(){
                $(this).siblings().removeClass('active');
                $(this).addClass('active');
            });

            $('.paytype ul li').on('touchstart',function(){
                $(this).siblings().removeClass('active');
                $(this).siblings().children('img').attr('src','../images/noselected.png').removeClass('selected').addClass('noselected');
                $(this).addClass('active');
                $(this).children('img').attr('src','../images/selected.png').removeClass('noselected').addClass('selected');
            })

            $('#submit').on('touchstart',function(){
                var id = $('.money ul li.active').attr('data-id');
                $.post("/index.php?m=Home&c=pay&a=diamond",{id:id},function(data){
                    alert(data);
                    if(data == '充值成功'){
                        window.location.href = "/index.php?m=Home&c=home&a=index";
                    }
                    
                })
            })
        })